package com.fesine.learn.design.principle.openclose;

/**
 * @description: 类描述
 * @author: fesine
 * @createTime:2019/2/16
 * @update:修改内容
 * @author: fesine
 * @updateTime:2019/2/16
 */
public class Test {
    public static void main(String[] args) {
        ICourse iCourse = new JavaDiscountCourse(1,"java设计模式",55d);
        JavaDiscountCourse javaCourse = (JavaDiscountCourse) iCourse;
        System.out.println("课程号："+javaCourse.getId()
                +"，课程名称："+javaCourse.getName()+"，原价："+javaCourse.getOriginPrice()+",打折后价格："+javaCourse.getPrice());
    }
}
